class_name 拳师Handler extends BigHandler


func 怒威神拳(data:Dictionary):
	var point_start = gameManager.map_points.get(data.start)
	var point_end = gameManager.map_points.get(data.end)
	var big = point_start.big as Big
	big.moveBefore()
	point_end.big = big
	point_start.big = null
	big.point = point_end
	big.position = point_end.position
	# 玩家是自己或者观战复盘
	if point_end.is_view || ObjectManager.gameManager.me_player == null:
		ObjectManager.soundManager.play(SoundType.拳师_拳击)
		gameManager.layer_effect.拳击(point_end, "神拳")


func 爆裂火拳(data:Dictionary):
	var point_start = gameManager.map_points.get(data.start)
	var point_end = gameManager.map_points.get(data.end) as Point
	var big = point_start.big as Big
	big.moveBefore()
	point_end.big = big
	point_start.big = null
	big.point = point_end
	big.position = point_end.position
	# 玩家是自己或者观战复盘
	if point_end.is_view || ObjectManager.gameManager.me_player == null:
		ObjectManager.soundManager.play(SoundType.拳师_拳击)
		gameManager.layer_effect.拳击(point_end, "火拳")


# 拳师 添加怒威神拳标记
func update_拳师_mark(data:Dictionary):
	var point_start = gameManager.map_points.get(data.start) as Point
	var point_end = gameManager.map_points.get(data.end) as Point
	var qs = point_start.big as 拳师
	if (qs.effect_node_怒威标记 == null):
		gameManager.layer_effect.怒威标记(qs, point_end)
	else:
		qs.effect_node_怒威标记.update(point_end)

# 拳师 删除怒威神拳标记
func remove_拳师_mark(data:Dictionary):
	var point_start = gameManager.map_points.get(data.start) as Point
	var qs = point_start.big as 拳师
	if (qs.effect_node_怒威标记 != null):
		qs.effect_node_怒威标记.remove()
